import { Entity, PrimaryColumn, Column} from 'typeorm';

@Entity('user')
export class User {
    @PrimaryColumn({ type: 'varchar', length: 36 })
    id: string; // 使用UUID作为主键

    @Column({ type: 'varchar', length: 50, unique: true })
    account: string; // 账号，唯一

  @Column({ type: 'varchar', length: 255 })
  password: string; // 密码

  @Column({ type: 'varchar', length: 100, nullable: true })
  name: string; // 姓名

  @Column({ type: 'varchar', length: 100, nullable: true })
  email: string; // 邮箱

  @Column({ type: 'varchar', length: 20, nullable: true })
  phone: string; // 手机号

  @Column({ type: 'varchar', length: 10, nullable: true })
  gender: string; // 性别

  @Column({ type: 'varchar', length: 20, nullable: true })
  identity: string; // 身份
}